package com.sptpc.learnspring.controller.request;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.sptpc.learnspring.utils.MoneyDeserializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.joda.money.Money;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
public class NewDrinkRequest {

        @NotEmpty
        private String name;
        @NotNull
        private Long categoryId;

        @JsonDeserialize(using = MoneyDeserializer.class)
        @NotNull
        private Money price;
}
